<!DOCTYPE html>
<html class="search-page">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>视频集-<?php echo $floder->name?></title>
    <meta name="charset" content="utf-8">
    <meta name="viewport"
          content="initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, width=device-width">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta http-equiv="Cache-Control" content="must-revalidate,no-cache">
    <meta name="application-name" content="">
    <meta name="description" content="">
    <meta name="keywords" content="">
    <link rel="stylesheet" href="<?php echo $this->CSS_PATH ?>list.css">
</head>
<body>
<section class="_pre">
    <!-- 搜索框 -->
    <header id="head_search_box"
            style="position: fixed; top: 0px; -webkit-transform-origin: 0px 0px; opacity: 1; -webkit-transform: scale(1, 1);">
        <div class="search_header" style="height: 45px">
            <a href="<?php echo $this->createUrl('wfloder/list',array('type'=>'video'))?>" class="back search_back" id="search_back"></a>
            <div class="search">
                <form id="search_form" method="get" action="" target="_parent">
                    <div class="text_box">
                        <input id="keyword" name="key" type="text" placeholder="" class="text" value="" style="height: 30px">
                    </div>
                    <input type="submit" value="" class="submit" id="list_search_submit">
                </form>
            </div>
        </div>
    </header>
    <div style="height:47px;" class="empty_div">&nbsp;</div>
    <!-- result -->
    <section class="goods_list" id="goods_list">
        <div class="clearfix">
            <ul class="clearfix" id="flow_box">
            </ul>
        </div>
    </section>
</section>
<script src="<?php echo Yii::app()->baseUrl?>/static/layui/layui.js"></script>
<script>
    layui.use(['flow','layer','jquery'], function(){
        var flow = layui.flow;
        var layer = layui.layer;
        var $ = layui.jquery;
        var flow_obj = {
            elem: '#flow_box', //流加载容器
            end:'我是有底线的',
            done: function(page, next){ //执行下一页的回调
                var params = {
                    page:page,
                    pid:<?php echo $floder->id?>,
                    keyword:$('#keyword').val()
                };

                $.post('<?php echo $this->createUrl('wvideo/list')?>',params, function (ret) {
                    if (ret.code != 0) {
                        layer.msg(ret.message,{time:1500, icon:2});
                    } else {
                        var html = '';
                        var baseUrl = '<?php echo Yii::app()->baseUrl?>';
                        //var detailUrl = '<?php //echo $this->createUrl('wvideo/detail')?>//?id=';
                        layui.each(ret.data.data,function (k,v) {
                            html += '<li>\n' +
                                ' <div>\n' +
                               // '<a href="'+detailUrl+v.id+'" name="product_item">\n' +
                                '<p class="img">\n' +
                                '<video src="'+baseUrl+v.upload_src+'" controls="controls" width="157" height="157">您的浏览器不支持视屏播放</video>\n' +
                                ' </p>\n' +
                                '<p class="name">'+v.title+'</p>\n' +
                               // ' </a>\n' +
                                '</div>\n' +
                                '</li>';
                        });
                        next(html, page<ret.data.page_total);
                    }
                });
            }
        };
        flow.load(flow_obj);
        $('#search_form').submit(function () {
            $('#flow_box').empty();
            flow.load(flow_obj);
            return false;
        });
    });
</script>
</body>
</html>
